using System;
using System.Collections.Generic;
using System.Text;
using sbMembership.Library.Domain;
using sbMembership.Library.Presenters;
using sbMembership.Library.Presenters.ViewInterfaces;

namespace Tests.sbMembership.AddUser
{
    public class MockAddUserView : IAddUserView
    {
        private sbUser userToAdd;

        public MockAddUserView()
        {
            userToAdd = new sbUser(TestSetup.testAddUserName, "password", TestSetup.testAddUserName + "@example.com");
        }

        #region IAddUserView Members

        private string message;
        public string Message
        {
            set { message = value; }
            get { return message; }
        }

        private AddUserPresenter presenter;
        public void AttachPresenter(AddUserPresenter presenter)
        {
            this.presenter = presenter;
        }

        public sbUser UserToAdd
        {
            get
            {
                return userToAdd;
            }
        }

        public void ResetForm()
        {
            userToAdd.UserName = TestSetup.testAddUserName;
            userToAdd.Password = "password";
            userToAdd.Email = "testUser@example.com";
        }

        #endregion
    }
}
